package com.learn.design.strategy;

import org.springframework.stereotype.Component;

import java.math.BigDecimal;

@Component
public class ZhaoLiuHandler extends CalculateHandler {
    @Override
    public BigDecimal calculate(String name) {
        System.out.printf(name+"計費了");
        return BigDecimal.ONE;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        Factory.register("赵六",this);
    }
}
